package luke.audio.metadata;



/**
 * 歌曲信息类，用于存储音频文件的相关信息
 */
public class Song {
    // 音频文件路径
    private String audioPath;

    // 文件名
    private String fileName;

    // BPM值
    private double bpm;


    // 鼓点偏移量（以毫秒为单位）
    private int beatOffset;

    // 音频时长（以毫秒为单位）
    private int duration;

    /**
     * 默认构造函数
     */
    public Song() {
        this.beatOffset = 0;
    }
    /**
     * 带参数的构造函数
     *
     * @param audioPath   音频文件路径
     * @param fileName    文件名
     * @param bpm         BPM值
     * @param beatOffset  鼓点偏移量（以毫秒为单位）
     */
    public Song(String audioPath, String fileName, double bpm, int beatOffset) {
        this.audioPath = audioPath;
        this.fileName = fileName;
        this.bpm = bpm;
        this.beatOffset = beatOffset;
    }

    public String getAudioPath() {
        return audioPath;
    }

    public void setAudioPath(String audioPath) {
        this.audioPath = audioPath;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public double getBpm() {
        return bpm;
    }

    public void setBpm(double bpm) {
        this.bpm = bpm;
    }

    public int getBeatOffset() {
        return beatOffset;
    }

    public void setBeatOffset(int beatOffset) {
        this.beatOffset = beatOffset;
    }

    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }
}